package com.azusa.common.exception;

import java.util.HashMap;
import java.util.Map;

public class ErrorCode {
	
    private static Map<String,String> errorCodeMap;
	
	private final static ErrorCode errorCode = new ErrorCode();
	
	private ErrorCode(){
		
	}
	
	public static ErrorCode getInstance(){		
		return errorCode;
	}
	
	static{ 
		errorCodeMap = new HashMap<String,String>();
		errorCodeMap.put("HTTP_ERROR_01", "Get方式请求的入参有错误");
		errorCodeMap.put("HTTP_ERROR_02", "IO异常");
	}
	
	public Map<String, String> getPayErrorMap() {
		return errorCodeMap;
	}
	
	public String getErrorDescribeByCode(String code){
		String describe = "";
		if(code != null){
			describe = errorCodeMap.get(code);
		}		
		return describe;
	}
}
